
class Student{
    String id;
    String name;
    public Student(String id, String name) {
        this.id = id;
        this.name = name;
    }
    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
public class Test {
    public static void main(String[] args) {
      Student student  = new Student("123141","张三");
      Thread t1 = new Thread(()->{
          System.out.println("线程t1 "+student);
        });
        Thread t2 = new Thread(()->{
            System.out.println("线程t2 "+student);
        });
      t1.start();
      t2.start();
    }
}
